#pragma once
#include "INET_Addr.h"
#include "SOCK_Stream.h"

class SOCK_Acceptor
{
	public:
		// Initialize a passive-mode acceptor socket.
		SOCK_Acceptor();
		~SOCK_Acceptor();

		// A second method to initialize a passivemode
		// acceptor socket, analogously to the constructor.
		bool open (const INET_Addr &sock_addr);

		// Accept a connection and initialize the <stream>.
		void accept(SOCK_Stream &s);
		char* myIp();

		SOCKET getHandle();

	private:
		SOCKET handle_; // Socket handle factory.
};